import java.rmi.*;

public class ReverseClient {
	public static void main (String [] args){
		try {
			ReverseInterface rev = (ReverseInterface)Naming.lookup("rmi://192.168.101.23:1099/MyReverse");
			String result = rev.reverseString (args [0]);
			System.out.println ("L'inverse de "+args[0]+" est "+ result + "ma gueule de poulette");
		} catch (Exception e) {
			System.out.println ("Erreur d'acces a l'objet distant.");
			System.out.println (e.toString());
		}
	}
}
